﻿namespace = italy_flavor

#SIC Cholera Pandemic in Sicily
italy_flavor.1 = {
	type = country_event
	placement = scope:sicily_scope

	title = italy_flavor.1.t
	desc = italy_flavor.1.d
	flavor = italy_flavor.1.f

	event_image = {
		video = "gfx/event_pictures/unspecific_sick_in_hospital.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/unspecific/sick_people_in_a_field_hospital"

	icon = "gfx/interface/icons/event_icons/event_skull.dds"

	duration = 3

	trigger = {
		owns_entire_state_region = STATE_SICILY
		AND = {
			game_date < 1837.7.1
			game_date > 1837.5.31
		}
		NOT = {
			AND = {
				has_technology_researched = modern_sewerage
				has_technology_researched = pharmaceuticals
			}
		}
	}

	immediate = {
		s:STATE_SICILY = {
			random_scope_state = {
				save_scope_as = sicily_scope
			}
		}
		set_global_variable = sicilian_rev_possible_var
	}

	option = {
		name = italy_flavor.1.a
		default_option = yes

		s:STATE_SICILY = {
			random_scope_state = {
				add_modifier = {
					name = sicily_cholera_1
					months = short_modifier_time
				}
				add_radicals = {
					value = 0.1
				}
			}
		}

		add_modifier = {
			name = sicily_cholera_cost
			multiplier = money_amount_multiplier_medium
			months = short_modifier_time
		}
		add_technology_progress = {
			progress = 1500
			technology = modern_sewerage
		}
		add_technology_progress = {
			progress = 1500
			technology = pharmaceuticals
		}

	    ai_chance = {
			base = 80
		}
    }

	option = {
		name = italy_flavor.1.b

		s:STATE_SICILY = {
			random_scope_state = {
				add_modifier = {
					name = sicily_cholera_2
					months = short_modifier_time
				}
				add_radicals = {
					value = 0.2
				}
			}
		}

	    ai_chance = {
			base = 20	
		}
    }
}

#TUS Annexation of Lucca
italy_flavor.2 = {
	type = country_event
	placement = root

	title = italy_flavor.2.t
	desc = italy_flavor.2.d
	flavor = italy_flavor.2.f

	event_image = {
		video = "gfx/event_pictures/unspecific_signed_contract.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/africa/diplomats_negotiating"

	icon = "gfx/interface/icons/event_icons/event_portrait.dds"

	duration = 3

	trigger = {
		exists = c:LUC
		owns_entire_state_region = STATE_TUSCANY
		ROOT = {
			is_at_war = no
			has_law = law_type:law_monarchy
		}
		c:LUC = {
			OR = {
				has_journal_entry = je_springtime_of_the_peoples
				radical_fraction = {
					value >= 0.2
				}
				any_scope_state = {
					turmoil >= 0.15
				}	
			}
			relations:root >= relations_threshold:neutral 
			is_at_war = no
			is_player = no
			has_law = law_type:law_monarchy
		}
		NOT = {
			has_global_variable = lucca_question_happened
		}
	}

	immediate = {
		c:LUC = {
			save_scope_as = luc_scope
		}
		set_global_variable = {
			name = lucca_question_happened
			value = yes
		}
	}

	option = {
		name = italy_flavor.2.a
		default_option = yes

		s:STATE_EMILIA.region_state:LUC = {
			add_radicals = {
				value = 0.1
			}
		}
		annex = c:LUC

	    ai_chance = {
			base = 1
		}
    }

	option = {
		name = italy_flavor.2.b

		change_relations = {
			country = c:LUC
			value = 50
	    }

	    ai_chance = {
			base = 0	
		}
    }
}